var e = require, t = module, n = exports;

Object.defineProperty(n, "__esModule", {
    value: !0
}), n.GD = void 0;

var o = e("GameConfig");

n.GD = window.GD = new (function() {
    function t() {
        this.isSound = 1, this.isEffect = 1, this.isVibrate = 1, this.isNew = 1, this.isPet = 0, 
        this.isOpen = 0, this.isReward = 0, this.isEggs = 0, this.isAddToDesktop = 0, this.isFollow = 0, 
        this.isHideReward = 0, this.isNotice = 0, this.CDKEY = [], this.registerTime = 0, 
        this.saveTime = 0, this.saveLastTime = 0, this.signLastTime = 0, this.moneyLastTime = 0, 
        this.emptyLastTime = 0, this.seasonLastTime = 0, this.seasonOpenTime = 0, this.seasonRewardTime = 0, 
        this.refreshTime = 0, this.speedTime = 0, this.tryLastTime = 0, this.dailyLastTime = 0, 
        this.hatchLastTime = 0, this.playTime = 0, this.playLastTime = 0, this.continuteTime = 0, 
        this.drawFreeCount = 1, this.combineFreeCount = 1, this.tryFreeCount = 1, this.tryFailCount = 0, 
        this.emptyFailCount = 0, this.shareCount = 0, this.pieceCount = 0, this.diamondCount = 0, 
        this.eventCount = 0, this.recorderCount = 0, this.reportCount = 0, this.giftCountMap = {}, 
        this.eggLastTime = 0, this.eggsHintNum = 0, this.eggsHintState = 0, this.eggDatas = [], 
        this.eggPDatas = [], this.eggCDatas = [], this.killNum = 0, this.winNum = 0, this.lastWinNum = 0, 
        this.winTotal = 0, this.level = 0, this.curLevel = 0, this.topLevel = 0, this.lastLevel = 0, 
        this.score = 1e3, this.curScore = 0, this.topScore = 0, this.lastScore = 0, this.topRank = 0, 
        this.lastPersonIdx = 0, this.personIdx = 0, this.gunIdx = 0, this.petIdx = 0, this.petLevel = 0, 
        this.pet_hp = 3200, this.lastPetDataIdx = 0, this.petDataIdx = 0, this.petDataList = [ {
            lv: 0,
            hp: 3200,
            form: 0,
            has: 0,
            time: 0
        }, {
            lv: 0,
            hp: 3300,
            form: 0,
            has: 0,
            time: 0
        } ], this.headEquipIdx = -1, this.backEquipIdx = -1, this.equipDataList = [], this.money = 400, 
        this.diamond = 0, this.piece = 0, this.gunOwnList = [], this.olympicDrawTotal = 0, 
        this.olympicDrawTime = 0, this.playerData = {
            icon: "",
            nickname: ""
        }, this.dailyInfo = [], this.count = [], this.matrix = [], this.skins = [ 0 ], this.gides = [ 0, 0 ], 
        this.videoCountList = [ 0, 0, 0 ], this.ModeDatas = [], this.videoAdDataList = [], 
        this.cutomAdDataList = [], this.bannerDatas = [], this.guideDatas = [], this.isChristmasPop = 1, 
        this.isChristmasReward = 0, this.christmasItems = [], this.christmasPlayCount = 0, 
        this.christmasSkinCount = 0, this.christmasDrawCount = 0, this.christmasDrawTotal = 0, 
        this.isNewYearPop = 1, this.newYearItems = [], this.newYearPlayCount = 0, this.newYearSkinCount = 0, 
        this.newYearDrawCount = 0, this.newYearDrawTotal = 0, this.isNewActivityPop = 1;
    }
    return t.prototype.load = function(t) {
        for (var i in t) i in this && ("number" == typeof this[i] ? this[i] = this.getNumber(t[i], this[i]) : this[i] = this.getObject(t[i], this[i]));
        console.log("GameData:", JSON.stringify(this));
    }, t.prototype.sign = function(t) {
        return t < n.GD.dailyInfo.length && 0 == n.GD.dailyInfo[t] && (n.GD.dailyInfo[t] = 1, 
        n.GD.signLastTime = Date.now(), !0);
    }, t.prototype.updateNumber = function(t, i) {
        return t in this && !isNaN(i) && (0 != i && (this[t] += i), !0);
    }, t.prototype.updateLevel = function(t) {
        this.updateNumber("level", t) ? this.topLevel < this.level && (this.topLevel = this.level) : 0 != this.level && (this.level = 0);
    }, t.prototype.hasSkin = function(t) {
        return -1 < n.GD.skins.indexOf(t);
    }, t.prototype.addSkin = function(t) {
        return !this.hasSkin(t) && (n.GD.skins.push(t), !0);
    }, t.prototype.addVideoCount = function(t) {
        t >= this.videoCountList.length && (this.videoCountList[t] = 0), t < this.videoCountList.length && this.videoCountList[t]++;
    }, t.prototype.subVideoCount = function(t) {
        return t >= this.videoCountList.length && (this.videoCountList[t] = 0), t < this.videoCountList.length && t < o.GC.videoCountConfig.length && this.videoCountList[t] < o.GC.videoCountConfig[t] ? o.GC.videoCountConfig[t] - this.videoCountList[t] : 0;
    }, t.prototype.checkVideoCount = function(t) {
        return t >= this.videoCountList.length && (this.videoCountList[t] = 0), t < this.videoCountList.length && t < o.GC.videoCountConfig.length && this.videoCountList[t] >= o.GC.videoCountConfig[t];
    }, t.prototype.finishGide = function(t) {
        return t < this.gides.length && 1 != this.gides[t] && (this.gides[t] = 1, !0);
    }, t.prototype.getNumber = function(t, i) {
        return isNaN(t) ? i : t;
    }, t.prototype.getObject = function(t, i) {
        return t || i;
    }, t;
}())();